function Get-CentralOnPremParameters {
    [CmdletBinding()]
    [OutputType('Parameters')]
    param (
        [Parameter(Mandatory = $true, Position = 0)][Parameters]$Parameters
    )
    
    # Get server.
    $Parameters.LSCentral.Server.Name =  Get-CentralOnPremServerName -ServerName $Parameters.LSCentral.Server.Name -ConfirmAll $Parameters.ConfirmAll

    # Get server credentials.
    $Parameters.LSCentral.Server.Credential = Get-ServerCredential -Message "Please provide a server admin login on the LS Central server '$($Parameters.LSCentral.Server.Name)'." -UserName $Parameters.LSCentral.Server.UserName
    $Parameters.LSCentral.Server.UserName = $Parameters.LSCentral.Server.Credential.UserName

    # Get database.
    $Parameters.LSCentral.Database.Name = Get-CentralOnPremDatabaseName -DatabaseName $Parameters.LSCentral.Database.Name -ConfirmAll $Parameters.ConfirmAll

    # Test LS Central database connection.
    if (!(Test-Central -Parameters $Parameters)) {
        Write-Host # Newline.
        Write-Warning 'Could not establish connection to the LS Central database.'
        $Answer = Read-Host -Prompt 'Are you sure that the LS Central parameters are correct? (y/n)'
        
        if ($Answer -iin @('y','yes')) {
            # LS Central parameters are confirmed but the server cannot be 'reached'.
            $Parameters.LSCentral.Server.ConfirmedButNotConnectable = $true
        } else {
            # Ask for LS Central parameters again.
            $Parameters.LSCentral.Server.Name = $null
            $Parameters.LSCentral.Server.Credential = $null
            $Parameters.LSCentral.Database.Name = $null
            return (Get-CentralOnPremParameters -Parameters $Parameters)
        }
    }

    return $Parameters
}